Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to QWebEngine #27

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Migrate to QWebEngine #27

wants to merge 5 commits into from

Conversation

marczellm
Copy link

Works on my machine, but needs more testing. Scrolling and resizing detection removed, not available with QWebEngine.

@xmikos
Copy link
Owner

xmikos commented Oct 17, 2016

You can edit .ui files in Designer (part of Qt distribution, or part of PyQt installation on Windows).

Btw. I have tried it with QWebEngine and the result is really awful (too much resource intensive - both RAM and CPU). So I am not considering switch to QWebEngine for now, but QHangups can support both (with QtWebKit used by default if available).

Things that has to be done before merging:

  1. make use of QWebEngine optional (by runtime command line option / settings in app).
  2. fix scrolling / resizing with QWebEngine
  3. use QWebEngine's runJavaScript() to manipulate DOM instead of BeautifulSoup (regenerating HTML and rendering whole page again after every new message is really bad)

It can be done, but I don't have resources (time) to do it myself in near future. But thanks for your preliminary work, it could be useful in future.

@marczellm
Copy link
Author

marczellm commented Oct 18, 2016

runtime command line option / settings in app

or figure out a way to catch the ImportError and then fall back to QWebEngine?

@xmikos
Copy link
Owner

xmikos commented Oct 18, 2016

That's not a problem, this should be default (if QtWebKit is unavailable, fall back to QWebEngine). But user who has QtWebKit installed should still have option to start QHangups with QWebEngine (at least for testing purposes).

@xmikos
Copy link
Owner

xmikos commented Oct 18, 2016

Btw. scrolling can be implemented with runJavaScript() too. See e.g. this as an example: QtWebEngineWebWidget.cpp

@xmikos
Copy link
Owner

xmikos commented Oct 18, 2016

It seems that whole on_contents_size_changed() (and related scroll_messages()) methods would have to be reimplemented in JavaScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants